package com.xhsj.user.hr.process.dto.processDefinition;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author: liuqinghua
 * @Description:流程审核的参数
 * @Data:2020/7/16
 */
@Data
public class HandleAuditDto {
    //业务id
    @NotNull(message = "dataId业务id不能为空")
    private Long dataId;

    //流程任务id
    @NotNull(message = "流程任务id不能为空")
    private Long processTaskId;

    //状态
    @NotNull(message = "status不能为空")
    private Integer status;

    // 节点id
    @NotNull(message = "nodeId采购申请节点id不能为空")
    private Long nodeId;

    // 审核意见
    private String opinionText;

    // 流程申请用户id
    @NotNull(message = "proposerId流程申请用户id不能为空")
    private Long proposerId;

    // 登录用户id
    private Long createBy;

    // 登录用户名
    private String createName;

    private  Object userId;

    private  Object roleIds;

    // 流程设计-流程申请匹配表
    @NotNull(message = "businessId不能为空")
    private  Long businessId;

    // 处理时间
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date createDate = new Date();

    // 申请类型
    private Integer applyType;

    // 请假天数
    private BigDecimal days;

    private Integer year;

    private Integer month;

    public HandleAuditDto() {
    }

    public HandleAuditDto(Long dataId, Long proposerId,Long createBy, Integer applyType) {
        this.dataId = dataId;
        this.proposerId = proposerId;
        this.createBy = createBy;
        this.applyType = applyType;
    }
}
